import request from '@/utils/request'

// 查询计件工资明细列表
export function listPieceworkMoneyDetail(query) {
  return request({
    url: '/hr/pieceworkMoneyDetail/list',
    method: 'get',
    params: query
  })
}

// 查询计件工资明细详细
export function getPieceworkMoneyDetail(id) {
  return request({
    url: '/hr/pieceworkMoneyDetail/' + id,
    method: 'get'
  })
}
// 查询计件工资明细详细
export function readTotal() {
  return request({
    url: '/hr/pieceworkMoneyDetail/readTotal',
    method: 'get'
  })
}

// 新增计件工资明细
export function addPieceworkMoneyDetail(data) {
  return request({
    url: '/hr/pieceworkMoneyDetail',
    method: 'post',
    data: data
  })
}

// 修改计件工资明细
export function updatePieceworkMoneyDetail(data) {
  return request({
    url: '/hr/pieceworkMoneyDetail',
    method: 'put',
    data: data
  })
}

// 删除计件工资明细
export function delPieceworkMoneyDetail(id) {
  return request({
    url: '/hr/pieceworkMoneyDetail/' + id,
    method: 'delete'
  })
}
